package org.fhkoeln.sgdm.sudoku.gui;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

public class TippFrame extends JFrame
{
	JTextArea text = null;
	
	private static TippFrame instance = null;
	
	public static TippFrame getInstance()
	{
		if(instance == null)
		{
			instance = new TippFrame();
		}
		return instance;
	}
	
	private TippFrame()
	{
		text = new JTextArea();
		text.setEditable(false);
		JScrollPane pane = new JScrollPane(text);
		pane.setAutoscrolls(true);
		this.add(pane);
		
		this.setSize(400,400);
		
		this.setVisible(true);
		
	}
	
	public void addText(String textToAdd)
	{
		text.append("\n" + textToAdd);
	}
}
